// pages/toplistshow/toplistshow.js
var app = getApp();
var config = require('../../config.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
  
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      userFaceUrl: app.globalData.userInfo.avatarUrl,
      nickName: app.globalData.userInfo.nickName,
      levelName: options.levelName,
      titleName: options.title
    });
  },

  

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

 
  saveImg:function(){
    console.log(1564)
    app.saveImgToPhotosAlbumTap();
  },

 /**
   * 分享
   */
  onShareAppMessage: function (res) {
    if (res.from === 'button') {
      // 来自页面内转发按钮
      console.log(res.target)
    }
    wx: wx.request({
        url: config.getOneChances,
        data: {
          openId: app.globalData.openid
        },
        method: 'POST',
        success: function (res) {
         
        },

      })
    return {
      title: app.globalData.userInfo.nickName + '邀请你答题冲榜！',
      path: '/pages/index/index?pageId=' + config.toplistshowResult,
      success: function (res) {
        
      }
    }
  }
})